package model;

import java.util.Date;

public class Item {
    private int id;             // 物品ID
    private String name;        // 物品名称
    private String description; // 物品描述
    private String type;        // 类型：lost（失物）/found（招领）
    private String location;    // 地点
    private Date time;          // 时间
    private String certificate; // 凭证
    private String status;      // 状态：pending（待处理）/matched（已匹配）/completed（已完成）
    private String userId;      // 关联用户账号

    // 构造方法
    public Item(int id, String name, String description, String type,
                String location, Date time, String certificate, String userId) {
        this.id = id;
        this.name = name;
        this.description = description;
        this.type = type;
        this.location = location;
        this.time = time;
        this.certificate = certificate;
        this.userId = userId;
        this.status = "pending"; // 默认待处理
    }

    // Getter和Setter
    public int getId() { return id; }
    public void setId(int id) { this.id = id; }

    public String getName() { return name; }
    public void setName(String name) { this.name = name; }

    public String getDescription() { return description; }
    public void setDescription(String description) { this.description = description; }

    public String getType() { return type; }
    public void setType(String type) { this.type = type; }

    public String getLocation() { return location; }
    public void setLocation(String location) { this.location = location; }

    public Date getTime() { return time; }
    public void setTime(Date time) { this.time = time; }

    public String getCertificate() { return certificate; }
    public void setCertificate(String certificate) { this.certificate = certificate; }

    public String getStatus() { return status; }
    public void setStatus(String status) { this.status = status; }

    public String getUserId() { return userId; }
    public void setUserId(String userId) { this.userId = userId; }
}